package com.ailink.spring;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Slf4j
@Configuration
public class MyBean {

    public void init() {
        log.info("init");
    }

    public void destroy() {
        log.info("destroy");
    }

    @Bean(initMethod = "init", destroyMethod = "destroy")
    public MyBean myBean1() {
        return new MyBean();
    }
}
